package com.fduss.artStore.dao;

import com.fduss.artStore.entity.Subject;

import java.util.List;

/**
 * @Author duocai wu
 * @Date 2017/6/24
 * @Time 19:55
 */
public interface SubjectDao {
    /**
     *
     * @param subject
     * @return a subject with subject id
     */
    Subject add(Subject subject);

    void delete(int subjectId);

    /**
     * search ArtworkSubject relation table to find subject id first,
     * then getOne(subjectId)
     * @param artworkId
     * @return
     */
    Subject getByArtwork(int artworkId);

    Subject getOne(int subjectId);

    List<Subject> getAll();
}
